#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import time

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if BASE_DIR not in sys.path:
    sys.path.append(BASE_DIR)

if __name__ == "__main__":
    version = (str(time.time()).split(".")[0])
    f = open(os.path.join(BASE_DIR, "conf/config.py"), "r")
    content = f.read()
    content = content.replace("__version__", version)
    f.close()
    print(content)
    f = open(os.path.join(BASE_DIR, "conf/config.py"), "w")
    f.write(content)
    f.close()
    print("ok")
    sys.exit(0)
